package hacker_rank._101hackfeb;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class CutSticks {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int N = Integer.parseInt(br.readLine());

		int[] A = new int[N];
		String[] line = br.readLine().split(" ");

		for (int i = 0; i < N; i++) {
			int a = Integer.parseInt(line[i]);
			A[i] = a;
		}
		Arrays.sort(A);

		for (int i = 0; i < A.length; i++) {
			int res = 0;

			doCut(A, res);
		}

	}

	static void doCut(int[] A, int res) {
		int i = 0;
		while (i < A.length && A[i] <= 0)
			i++;
		if(i == A.length)
			return;
		int min = A[i];
		A[i] = A[i] - min;
		res++;
		for (int j = i + 1; j < A.length; j++) {
			A[j] = A[j] - min;
			res++;
		}
		System.out.println(res);

	}
}
